<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>轮播图</title>
</head>
<body>
    <img id="page" src="img/page_1.jpg">
    <script>
        var number = 1;
        function turning(){
            number++;
            if(number > 3){
                number = 1;
            }
            var page = document.getElementById("page");
            page.src = "img/page_" + number + ".jpg";
        }
        setInterval(turning, 2000);
    </script>
</body>
</html>